package com.example.mydemoproject.model.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author LiuZhiYong
 * @description 添加定时任务Vo
 * @date 2022-11-25
 **/
@ApiModel
@Data
public class QuartzJobReqVo {

    /**
     * 任务id
     */
    @ApiModelProperty(value = "任务id, 创建任务是不用传")
    private String id;

    /**
     * 任务类名
     */
    @ApiModelProperty(value = "任务类名", required = true)
    @NotBlank(message = "任务类名不能为空")
    private String jobClassName;

    /**
     * cron表达式
     */
    @ApiModelProperty(value = "cron表达式", required = true)
    @NotBlank(message = "cron表达式不能为空")
    private String cronExpression;

    /**
     * 参数
     */
    @ApiModelProperty(value = "参数")
    private String parameter;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 状态 0正常 -1停止
     */
    @ApiModelProperty(value = "状态 0正常 -1停止", required = true)
    @NotNull(message = "状态不能为空")
    private Integer status;

}
